package com.codejoys.monitor.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class DeviceData implements Serializable {
    private Integer id;

    private Integer deviceId;

    @ColumnWidth(25)
    @ExcelProperty(value = "日期时间", index = 0)
    private Date created;

    @ExcelProperty(value = "电压值", index = 1)
    @ColumnWidth(20)
    private BigDecimal voltage;

    @ExcelProperty(value = "电流值", index = 2)
    @ColumnWidth(20)
    private BigDecimal current;

    @ColumnWidth(20)
    @ExcelProperty(value = "温度值", index = 3)
    private BigDecimal temperature;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Integer deviceId) {
        this.deviceId = deviceId;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public BigDecimal getVoltage() {
        return voltage;
    }

    public void setVoltage(BigDecimal voltage) {
        this.voltage = voltage;
    }

    public BigDecimal getCurrent() {
        return current;
    }

    public void setCurrent(BigDecimal current) {
        this.current = current;
    }

    public BigDecimal getTemperature() {
        return temperature;
    }

    public void setTemperature(BigDecimal temperature) {
        this.temperature = temperature;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", deviceId=").append(deviceId);
        sb.append(", created=").append(created);
        sb.append(", voltage=").append(voltage);
        sb.append(", current=").append(current);
        sb.append(", temperature=").append(temperature);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}